﻿<Page x:Class="ScoreMS.Views.SyllabusAdd"
      xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
      xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
      xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
      xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
      mc:Ignorable="d" 
      d:DesignHeight="300" d:DesignWidth="618"
	Title="SyllabusAdd">

    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="72" />
            <RowDefinition Height="*" />
        </Grid.RowDefinitions>
        <TextBlock Text="查看教学大纲" VerticalAlignment="Center" TextAlignment="Center" FontSize="24" Grid.Row="0"></TextBlock>

        <Grid Grid.Row="1">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="352*" />
                <ColumnDefinition Width="266*" />
            </Grid.ColumnDefinitions>
            
            <Grid Grid.Column="0">
                <Grid.RowDefinitions>
                    <RowDefinition Height="48" />
                    <RowDefinition Height="*" />
                </Grid.RowDefinitions>
                <StackPanel Grid.Row="0" Orientation="Horizontal">
                    <TextBlock Text="选择课程" FontSize="18" Height="23" Margin="20, 0, 0, 0" VerticalAlignment="Center" Name="textBlock3" />
                    <ComboBox Height="23" Margin="20, 0, 0, 0" VerticalAlignment="Center" Name="cbxCourse" MinWidth="120" SelectionChanged="cbxCourse_SelectionChanged">
                        <ComboBox.ItemTemplate>
                            <DataTemplate>
                                <StackPanel Orientation="Horizontal">
                                    <TextBlock Text="{Binding course_id}"></TextBlock>
                                    <TextBlock Margin="3, 0, 0, 0" Text="{Binding course_name}"></TextBlock>
                                </StackPanel>
                            </DataTemplate>
                        </ComboBox.ItemTemplate>
                    </ComboBox>
                </StackPanel>
                <DataGrid Grid.Row="1" AutoGenerateColumns="False" HorizontalAlignment="Left" Name="dataGrid1" VerticalAlignment="Top">
                    <DataGrid.Columns>
                        <DataGridTextColumn Header="知识点章节" Width="*" Binding="{Binding syllabus_index}"/>
                        <DataGridTextColumn Header="描述" Width="*" Binding="{Binding syllabus_descr}"/>
                    </DataGrid.Columns>
                </DataGrid>
            </Grid>
            
            <Expander Grid.Column="1" Header="添加知识点" Height="222" HorizontalAlignment="Left" Name="expander1" VerticalAlignment="Top" Width="260">
                <Grid>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="112*" />
                        <ColumnDefinition Width="146*" />
                    </Grid.ColumnDefinitions>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="80*" />
                        <RowDefinition Height="119*" />
                    </Grid.RowDefinitions>
                    
                    <TextBlock Grid.Row="0" Grid.Column="0" Margin="0, 20, 0, 0" Height="23" HorizontalAlignment="Right" Name="textBlock2" Text="描述" VerticalAlignment="Top" Width="49" />
                    <TextBox Grid.Row="0" Grid.Column="1" Margin="0, 20, 0, 0" Height="50" TextWrapping="Wrap" HorizontalAlignment="Left" Name="txtsyllabus_descr" VerticalAlignment="Top" Width="120" />

                    <Button Content="添加" Grid.Column="1" Grid.Row="1" Height="23" HorizontalAlignment="Left" Margin="15,28,0,0" Name="button1" VerticalAlignment="Top" Width="75" Click="button1_Click" />
                </Grid>
            </Expander>
        </Grid>
    </Grid>
</Page>
